<%@ page language="java"  pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>后台登入</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="../resource/css/login.css">
    <link rel="stylesheet" type="text/css" href="../resource/css/public.css">
  </head>
  <script type="text/javascript">
  function reloadValidCode() { 
document.getElementById("LinkButton1").src='${pageContext.request.contextPath}/randomCodeServlet?now=' + new Date();
 } 
 
   function checkform() {
   if(document.getElementById("txtUserName").value==""||document.getElementById("txtUserPassword").value==""||document.getElementById("txtSN").value=="")
   {
   document.all.name.style.visibility = ""; 
   document.frm.txtUserName.focus();
   document.frm.txtUserPassword.focus();
   document.frm.txtSN.focus();
   return false;
   }
    
 }
  </script>
  <body>
     <DIV id=div1>
  <TABLE id=login height="100%" cellSpacing=0 cellPadding=0 width=800 
align=center>
    <TBODY>
      <TR id=main >
        <TD>
          <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%">
          <form id="isLegalUser" action="login!isLegalUser.shtml" onSubmit="return checkform()" name=frm>
            <TBODY>
              <TR>
                <TD colSpan=5>&nbsp;</TD>
              </TR>
              <TR height=30>
                <TD width=380>&nbsp;</TD>
                <TD>&nbsp;</TD>
                <TD>&nbsp;</TD>
                <TD>&nbsp;</TD>
              </TR>
              <TR height=40>
                <TD rowSpan=4>&nbsp;</TD>
                <TD>用户名：</TD>
                <TD>
                  <INPUT class=textbox id=txtUserName name=txtUserName>
                </TD>
               <td id="name"  style="visibility:hidden" ><span style="color:red">名字，密码或者验证码不能为空</span></td>
              </TR>
              <TR height=40>
                <TD>密　码：</TD>
                <TD>
                  <INPUT class=textbox id=txtUserPassword type=password 
            name=txtUserPassword>
                </TD>
                <TD width=120>&nbsp;</TD>
              </TR>
              <TR height=40>
                <TD>验证码：</TD>
                <TD vAlign=center colSpan=2>
                
                  <INPUT id=txtSN size=4 name=txtSN />
                  &nbsp; <IMG  src="${pageContext.request.contextPath}/randomCodeServlet"   id="LinkButton1"/><a 
            href="#" onclick="reloadValidCode()">看不清，换一张</a> 
            </TD>
              </TR>
              <TR height=40>
                <TD></TD>
                <TD align=right>
                  <INPUT id=btnLogin type=submit value=" 登 录 " name=btnLogin >
                </TD>
                <TD width=120>&nbsp;</TD>
              </TR>
              <TR height=110>
                <TD colSpan=5>&nbsp;</TD>
              </TR>
            </TBODY>
            </form>
          </TABLE>
        </TD>
      </TR>
      <TR id=root height=104>
        <TD>&nbsp;</TD>
      </TR>
    </TBODY>
  </TABLE>
</DIV>
<DIV id=div2 style="DISPLAY: none"></DIV>
  </body>
</html>
